<?php 
$post_date = new DateTime($product->post_date); 
// define canonical link	
$canonical_link = $this->config->item('base_url') . '/' .date_format($post_date, 'Y_d_' ) . $product->product_id . '/' . $product->slug_product_title ;
// $current_url = $this->config->config['site_url'].$_SERVER['REQUEST_URI'];
// if($canonical_link != $current_url)
$this->html_meta['canonical'] = $canonical_link;

?>
<?php
	$product_link = get_product_url($product);
?>
<div itemscope itemtype="http://data-vocabulary.org/Product" class="product-detail" id="<?php echo 'product-', $product->product_id; ?>">	
	<div class="product-image">
		<a class="p-link" href="<?php echo $this->config->item('base_url'),'/track?url=', urlencode(str_replace('http://', '', $product->aff_url)); ?>"  title="" target="_blank">
		<?php if(empty($product->aff_img_medium)){ ?>
			<img src="<?php echo $this->config->config['public_url'].'/images/img-default.png'; ?>" alt="No image exists" width="198" height="167" />
		<?php } else{ ?>
			<img itemprop="image" src="<?php echo $product->aff_img_medium; ?>" alt="" />
		<?php } ?>
		</a>
		<?php
		/*
		<div class="social-box">
			<!-- face book -->							
			<span class="fb-icon">
				<div class="fb-like" data-href="<?php echo $product_link; ?>" data-send="false" data-layout="box_count" data-width="450" data-show-faces="false" data-font="arial"></div>
			</span >
			<!-- twitter -->
			<span class="twitter-icon">
				<a href="https://twitter.com/share" class="twitter-share-button" data-url="<?php echo $product_link; ?>" data-text="<?php echo $product->slug_product_title; ?>" data-count="vertical" data-size="small">Tweet</a>
			</span>
			<!-- google +1 -->
			<span class="googleplus-icon">
				<g:plusone size="tall" href="<?php echo $product_link; ?>"></g:plusone>
			</span>
			<div class="cb"></div>
		</div>
		*/
		?>
	</div>
	<div class="product-cover">
		<h2 class="title"><a class="p-link" href="<?php echo $this->config->item('base_url'),'/track?url=', urlencode(str_replace('http://', '', $product->aff_url)); ?>"  title="" target="_blank"><?php echo $product->product_title;?></a></h2>
		<!--<div class="date">Posted on : <?php echo date_format($post_date, 'j M Y' ) ;?></div>-->
		<div class="categories">Category :  <?php echo  '<a rel="category tag" title="View all posts in ', $category->category_name,'" href="', $this->config->item('base_url'), '/category/', $category->slug_parent_category_name, (empty($category->slug_parent_category_name) ? '' : '/'), $category->slug_category_name, '">',$category->category_name,'</a>';?></div>
		<div>
			<p id="content-ad">
				<?php // echo $category->ad_box_medium; ?>
			</p>
			<div itemprop="description" class="entry">
			<?php 	$paragraphs = explode('</p>', $product->product_desc);
					$paragraphs_count = count($paragraphs);
					$show_ad_after = intval($paragraphs_count / 2);
					$show_ad_after = $show_ad_after < 2 ? -1 : $show_ad_after;
					for($i=0; $i < $paragraphs_count ; $i = $i + 1)
					{
						if($i == $show_ad_after)
						{
			?>
							<p>
								<?php if(isset($category->ad_rectangle_hr_medium)) echo $category->ad_rectangle_hr_medium; ?>
							</p>
			<?php
						}
						echo '<p>', strip_tags($paragraphs[$i]), '</p>'; 
					}
			?>
			</div>
		</div>
		<div class="boxmeta">
			<span class="originalPrice detail">
				<?php if(intval($product->original_price) > 0 && intval($product->sale_price) != intval($product->original_price)){
					echo '$' . $product->original_price;
				} ?>
			</span>
			<span class="p-cost">$<?php echo $product->sale_price; ?></span>
			<a class="p-link" href="<?php echo $this->config->item('base_url'),'/track?url=', urlencode(str_replace('http://', '', $product->aff_url)); ?>"  title="" target="_blank">Buy Now</a>
			<div class="cb"></div>
		</div>
	</div>
	<div class="cb"></div>
	<?php 
		
		$sociable_url = urlencode($this->config->item('base_url') . '/' .date_format($post_date, 'Y_d_' ) . $product->product_id . '/' . $product->slug_product_title);
		$sociable_title = urlencode($product->product_title);
		$sociable_image_url = ($this->config->item('public_url'));
		$sociable_body = strip_tags(substr($product->product_desc, 0, strpos($product->product_desc, "<!--more-->")));
	?>	
	<?php 
	/*
	<div class="sociable">
		<div class="sociable_tagline"><strong>Share and Enjoy:</strong></div>
		<ul class="sociable">
			<li><a rel="nofollow"  href="http://www.printfriendly.com/print?url=<?php echo $sociable_url;?>&amp;partner=sociable" onclick="javascript:_gaq.push(['_trackEvent','outbound-product','www.printfriendly.com']);" title="Print"><img src="<?php echo $sociable_image_url;?>/sociable/images/services-sprite.gif" title="Print" alt="Print" style="width: 16px; height: 16px; background: transparent url(<?php echo $sociable_image_url;?>/sociable/images/services-sprite.png) no-repeat; background-position:-343px -37px" class="sociable-hovers" /></a></li>
			<li><a rel="nofollow"  href="http://digg.com/submit?phase=2&amp;url=<?php echo $sociable_url;?>&amp;title=<?php echo $sociable_title;?>&amp;bodytext=<?php echo $sociable_body; ?>" onclick="javascript:_gaq.push(['_trackEvent','outbound-product','digg.com']);" title="Digg"><img src="<?php echo $sociable_image_url;?>/sociable/images/services-sprite.gif" title="Digg" alt="Digg" style="width: 16px; height: 16px; background: transparent url(<?php echo $sociable_image_url;?>/sociable/images/services-sprite.png) no-repeat; background-position:-235px -1px" class="sociable-hovers" /></a></li>
			<li><a rel="nofollow"  href="http://sphinn.com/index.php?c=post&amp;m=submit&amp;link=<?php echo $sociable_url;?>" onclick="javascript:_gaq.push(['_trackEvent','outbound-product','sphinn.com']);" title="Sphinn"><img src="<?php echo $sociable_image_url;?>/sociable/images/services-sprite.gif" title="Sphinn" alt="Sphinn" style="width: 16px; height: 16px; background: transparent url(<?php echo $sociable_image_url;?>/sociable/images/services-sprite.png) no-repeat; background-position:-199px -55px" class="sociable-hovers" /></a></li>
			<li><a rel="nofollow"  href="http://delicious.com/post?url=<?php echo $sociable_url;?>&amp;title=<?php echo $sociable_title;?>&amp;notes=<?php echo $sociable_body; ?>" onclick="javascript:_gaq.push(['_trackEvent','outbound-product','delicious.com']);" title="del.icio.us"><img src="<?php echo $sociable_image_url;?>/sociable/images/services-sprite.gif" title="del.icio.us" alt="del.icio.us" style="width: 16px; height: 16px; background: transparent url(<?php echo $sociable_image_url;?>/sociable/images/services-sprite.png) no-repeat; background-position:-199px -1px" class="sociable-hovers" /></a></li>

			<li><a rel="nofollow"  href="http://www.facebook.com/share.php?u=<?php echo $sociable_url;?>&amp;t=<?php echo $sociable_title;?>" onclick="javascript:_gaq.push(['_trackEvent','outbound-product','www.facebook.com']);" title="Facebook"><img src="<?php echo $sociable_image_url;?>/sociable/images/services-sprite.gif" title="Facebook" alt="Facebook" style="width: 16px; height: 16px; background: transparent url(<?php echo $sociable_image_url;?>/sociable/images/services-sprite.png) no-repeat; background-position:-343px -1px" class="sociable-hovers" /></a></li>
			<li><a rel="nofollow"  href="http://www.mixx.com/submit?page_url=<?php echo $sociable_url;?>&amp;title=<?php echo $sociable_title;?>" onclick="javascript:_gaq.push(['_trackEvent','outbound-product','www.mixx.com']);" title="Mixx"><img src="<?php echo $sociable_image_url;?>/sociable/images/services-sprite.gif" title="Mixx" alt="Mixx" style="width: 16px; height: 16px; background: transparent url(<?php echo $sociable_image_url;?>/sociable/images/services-sprite.png) no-repeat; background-position:-91px -37px" class="sociable-hovers" /></a></li>
			<li><a rel="nofollow"  href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=<?php echo $sociable_url;?>&amp;title=<?php echo $sociable_title;?>&amp;annotation=<?php echo $sociable_body; ?>" onclick="javascript:_gaq.push(['_trackEvent','outbound-product','www.google.com']);" title="Google Bookmarks"><img src="<?php echo $sociable_image_url;?>/sociable/images/services-sprite.gif" title="Google Bookmarks" alt="Google Bookmarks" style="width: 16px; height: 16px; background: transparent url(<?php echo $sociable_image_url;?>/sociable/images/services-sprite.png) no-repeat; background-position:-91px -19px" class="sociable-hovers" /></a></li>
			<li><a  href="http://blogplay.com" onclick="javascript:_gaq.push(['_trackEvent','outbound-product','blogplay.com']);" title="Blogplay"><img src="<?php echo $sociable_image_url;?>/sociable/images/services-sprite.gif" title="Blogplay" alt="Blogplay" style="width: 16px; height: 16px; background: transparent url(<?php echo $sociable_image_url;?>/sociable/images/services-sprite.png) no-repeat; background-position:-199px -73px" class="sociable-hovers" /></a></li>
			<li><a rel="nofollow"  href="http://www.blinklist.com/index.php?Action=Blink/addblink.php&amp;Url=<?php echo $sociable_url;?>&amp;Title=<?php echo $sociable_title;?>" onclick="javascript:_gaq.push(['_trackEvent','outbound-product','www.blinklist.com']);" title="BlinkList"><img src="<?php echo $sociable_image_url;?>/sociable/images/services-sprite.gif" title="BlinkList" alt="BlinkList" style="width: 16px; height: 16px; background: transparent url(<?php echo $sociable_image_url;?>/sociable/images/services-sprite.png) no-repeat; background-position:-37px -1px" class="sociable-hovers" /></a></li>
			<li><a rel="nofollow"  href="http://blogmarks.net/my/new.php?mini=1&amp;simple=1&amp;url=<?php echo $sociable_url;?>&amp;title=<?php echo $sociable_title;?>" onclick="javascript:_gaq.push(['_trackEvent','outbound-product','blogmarks.net']);" title="blogmarks"><img src="<?php echo $sociable_image_url;?>/sociable/images/services-sprite.gif" title="blogmarks" alt="blogmarks" style="width: 16px; height: 16px; background: transparent url(<?php echo $sociable_image_url;?>/sociable/images/services-sprite.png) no-repeat; background-position:-73px -1px" class="sociable-hovers" /></a></li>
			<li><a rel="nofollow"  href="http://www.diigo.com/post?url=<?php echo $sociable_url;?>&amp;title=<?php echo $sociable_title;?>" onclick="javascript:_gaq.push(['_trackEvent','outbound-product','www.diigo.com']);" title="Diigo"><img src="<?php echo $sociable_image_url;?>/sociable/images/services-sprite.gif" title="Diigo" alt="Diigo" style="width: 16px; height: 16px; background: transparent url(<?php echo $sociable_image_url;?>/sociable/images/services-sprite.png) no-repeat; background-position:-253px -1px" class="sociable-hovers" /></a></li>
			<li><a rel="nofollow"  href="http://www.dzone.com/links/add.html?url=<?php echo $sociable_url;?>&amp;title=<?php echo $sociable_title;?>" onclick="javascript:_gaq.push(['_trackEvent','outbound-product','www.dzone.com']);" title="DZone"><img src="<?php echo $sociable_image_url;?>/sociable/images/services-sprite.gif" title="DZone" alt="DZone" style="width: 16px; height: 16px; background: transparent url(<?php echo $sociable_image_url;?>/sociable/images/services-sprite.png) no-repeat; background-position:-289px -1px" class="sociable-hovers" /></a></li>
			<li><a rel="nofollow"  href="mailto:?subject=<?php echo $sociable_title;?>&amp;body=<?php echo $sociable_url;?>" title="email"><img src="<?php echo $sociable_image_url;?>/sociable/images/services-sprite.gif"  title="email" alt="email" style="width: 16px; height: 16px; background: transparent url(<?php echo $sociable_image_url;?>/sociable/images/services-sprite.png) no-repeat; background-position:-325px -1px" class="sociable-hovers" /></a></li>

			<li><a rel="nofollow"  href="http://www.hyves.nl/profilemanage/add/tips/?name=<?php echo $sociable_title;?>&amp;text=<?php echo $sociable_body; ?>+<?php echo $sociable_url;?>&amp;rating=5" onclick="javascript:_gaq.push(['_trackEvent','outbound-product','www.hyves.nl']);" title="Hyves"><img src="<?php echo $sociable_image_url;?>/sociable/images/services-sprite.gif" title="Hyves" alt="Hyves" style="width: 16px; height: 16px; background: transparent url(<?php echo $sociable_image_url;?>/sociable/images/services-sprite.png) no-repeat; background-position:-217px -19px" class="sociable-hovers" /></a></li>
			<li><a rel="nofollow"  href="http://identi.ca/notice/new?status_textarea=<?php echo $sociable_url;?>" onclick="javascript:_gaq.push(['_trackEvent','outbound-product','identi.ca']);" title="Identi.ca"><img src="<?php echo $sociable_image_url;?>/sociable/images/services-sprite.gif" title="Identi.ca" alt="Identi.ca" style="width: 16px; height: 16px; background: transparent url(<?php echo $sociable_image_url;?>/sociable/images/services-sprite.png) no-repeat; background-position:-235px -19px" class="sociable-hovers" /></a></li>
			<li><a rel="nofollow"  href="http://www.kirtsy.com/submit.php?url=<?php echo $sociable_url;?>&amp;title=<?php echo $sociable_title;?>" onclick="javascript:_gaq.push(['_trackEvent','outbound-product','www.kirtsy.com']);" title="Kirtsy"><img src="<?php echo $sociable_image_url;?>/sociable/images/services-sprite.gif" title="Kirtsy" alt="Kirtsy" style="width: 16px; height: 16px; background: transparent url(<?php echo $sociable_image_url;?>/sociable/images/services-sprite.png) no-repeat; background-position:-289px -19px" class="sociable-hovers" /></a></li>
			<li><a rel="nofollow"  href="http://www.linkagogo.com/go/AddNoPopup?url=<?php echo $sociable_url;?>&amp;title=<?php echo $sociable_title;?>" onclick="javascript:_gaq.push(['_trackEvent','outbound-product','www.linkagogo.com']);" title="LinkaGoGo"><img src="<?php echo $sociable_image_url;?>/sociable/images/services-sprite.gif" title="LinkaGoGo" alt="LinkaGoGo" style="width: 16px; height: 16px; background: transparent url(<?php echo $sociable_image_url;?>/sociable/images/services-sprite.png) no-repeat; background-position:-343px -19px" class="sociable-hovers" /></a></li>
			<li><a rel="nofollow"  href="http://www.linkedin.com/shareproduct?mini=true&amp;url=<?php echo $sociable_url;?>&amp;title=<?php echo $sociable_title;?>&amp;source=product+Pages+The+Bank+of+products&amp;summary=<?php echo $sociable_body; ?>" onclick="javascript:_gaq.push(['_trackEvent','outbound-product','www.linkedin.com']);" title="LinkedIn"><img src="<?php echo $sociable_image_url;?>/sociable/images/services-sprite.gif" title="LinkedIn" alt="LinkedIn" style="width: 16px; height: 16px; background: transparent url(<?php echo $sociable_image_url;?>/sociable/images/services-sprite.png) no-repeat; background-position:-1px -37px" class="sociable-hovers" /></a></li>
			<li><a rel="nofollow"  href="http://www.mister-wong.com/addurl/?bm_url=<?php echo $sociable_url;?>&amp;bm_description=<?php echo $sociable_title;?>&amp;plugin=soc" onclick="javascript:_gaq.push(['_trackEvent','outbound-product','www.mister-wong.com']);" title="MisterWong"><img src="<?php echo $sociable_image_url;?>/sociable/images/services-sprite.gif" title="MisterWong" alt="MisterWong" style="width: 16px; height: 16px; background: transparent url(<?php echo $sociable_image_url;?>/sociable/images/services-sprite.png) no-repeat; background-position:-73px -37px" class="sociable-hovers" /></a></li>
			<li><a rel="nofollow"  href="http://www.mister-wong.de/addurl/?bm_url=<?php echo $sociable_url;?>&amp;bm_description=<?php echo $sociable_title;?>&amp;plugin=soc" onclick="javascript:_gaq.push(['_trackEvent','outbound-product','www.mister-wong.de']);" title="MisterWong.DE"><img src="<?php echo $sociable_image_url;?>/sociable/images/services-sprite.gif" title="MisterWong.DE" alt="MisterWong.DE" style="width: 16px; height: 16px; background: transparent url(<?php echo $sociable_image_url;?>/sociable/images/services-sprite.png) no-repeat; background-position:-73px -37px" class="sociable-hovers" /></a></li>
			<li><a rel="nofollow"  href="http://www.myspace.com/Modules/PostTo/Pages/?u=<?php echo $sociable_url;?>&amp;t=<?php echo $sociable_title;?>" onclick="javascript:_gaq.push(['_trackEvent','outbound-product','www.myspace.com']);" title="MySpace"><img src="<?php echo $sociable_image_url;?>/sociable/images/services-sprite.gif" title="MySpace" alt="MySpace" style="width: 16px; height: 16px; background: transparent url(<?php echo $sociable_image_url;?>/sociable/images/services-sprite.png) no-repeat; background-position:-145px -37px" class="sociable-hovers" /></a></li>
			<li><a rel="nofollow"  href="http://www.newsvine.com/_tools/seed&amp;save?u=<?php echo $sociable_url;?>&amp;h=<?php echo $sociable_title;?>" onclick="javascript:_gaq.push(['_trackEvent','outbound-product','www.newsvine.com']);" title="NewsVine"><img src="<?php echo $sociable_image_url;?>/sociable/images/services-sprite.gif" title="NewsVine" alt="NewsVine" style="width: 16px; height: 16px; background: transparent url(<?php echo $sociable_image_url;?>/sociable/images/services-sprite.png) no-repeat; background-position:-217px -37px" class="sociable-hovers" /></a></li>

			<li><a rel="nofollow"  href="http://ping.fm/ref/?link=<?php echo $sociable_url;?>&amp;title=<?php echo $sociable_title;?>&amp;body=<?php echo $sociable_body; ?>" onclick="javascript:_gaq.push(['_trackEvent','outbound-product','ping.fm']);" title="Ping.fm"><img src="<?php echo $sociable_image_url;?>/sociable/images/services-sprite.gif" title="Ping.fm" alt="Ping.fm" style="width: 16px; height: 16px; background: transparent url(<?php echo $sociable_image_url;?>/sociable/images/services-sprite.png) no-repeat; background-position:-271px -37px" class="sociable-hovers" /></a></li>
			<li><a rel="nofollow"  href="http://reddit.com/submit?url=<?php echo $sociable_url;?>&amp;title=<?php echo $sociable_title;?>" onclick="javascript:_gaq.push(['_trackEvent','outbound-product','reddit.com']);" title="Reddit"><img src="<?php echo $sociable_image_url;?>/sociable/images/services-sprite.gif" title="Reddit" alt="Reddit" style="width: 16px; height: 16px; background: transparent url(<?php echo $sociable_image_url;?>/sociable/images/services-sprite.png) no-repeat; background-position:-55px -55px" class="sociable-hovers" /></a></li>
			<li><a rel="nofollow"  href="http://www.findopendeals.com/feed/"  title="RSS"><img src="<?php echo $sociable_image_url;?>/sociable/images/services-sprite.gif" title="RSS" alt="RSS" style="width: 16px; height: 16px; background: transparent url(<?php echo $sociable_image_url;?>/sociable/images/services-sprite.png) no-repeat; background-position:-73px -55px" class="sociable-hovers" /></a></li>
			<li><a rel="nofollow"  href="http://socialogs.com/add_story.php?story_url=<?php echo $sociable_url;?>&amp;story_title=<?php echo $sociable_title;?>" onclick="javascript:_gaq.push(['_trackEvent','outbound-product','socialogs.com']);" title="Socialogs"><img src="<?php echo $sociable_image_url;?>/sociable/images/services-sprite.gif" title="Socialogs" alt="Socialogs" style="width: 16px; height: 16px; background: transparent url(<?php echo $sociable_image_url;?>/sociable/images/services-sprite.png) no-repeat; background-position:-163px -55px" class="sociable-hovers" /></a></li>
			<li><a rel="nofollow"  href="http://www.stumbleupon.com/submit?url=<?php echo $sociable_url;?>&amp;title=<?php echo $sociable_title;?>" onclick="javascript:_gaq.push(['_trackEvent','outbound-product','www.stumbleupon.com']);" title="StumbleUpon"><img src="<?php echo $sociable_image_url;?>/sociable/images/services-sprite.gif" title="StumbleUpon" alt="StumbleUpon" style="width: 16px; height: 16px; background: transparent url(<?php echo $sociable_image_url;?>/sociable/images/services-sprite.png) no-repeat; background-position:-217px -55px" class="sociable-hovers" /></a></li>
			<li><a rel="nofollow"  href="http://technorati.com/faves?add=<?php echo $sociable_url;?>" onclick="javascript:_gaq.push(['_trackEvent','outbound-product','technorati.com']);" title="Technorati"><img src="<?php echo $sociable_image_url;?>/sociable/images/services-sprite.gif" title="Technorati" alt="Technorati" style="width: 16px; height: 16px; background: transparent url(<?php echo $sociable_image_url;?>/sociable/images/services-sprite.png) no-repeat; background-position:-271px -55px" class="sociable-hovers" /></a></li>
			<li><a rel="nofollow"  href="http://tipd.com/submit.php?url=<?php echo $sociable_url;?>" onclick="javascript:_gaq.push(['_trackEvent','outbound-product','tipd.com']);" title="Tipd"><img src="<?php echo $sociable_image_url;?>/sociable/images/services-sprite.gif" title="Tipd" alt="Tipd" style="width: 16px; height: 16px; background: transparent url(<?php echo $sociable_image_url;?>/sociable/images/services-sprite.png) no-repeat; background-position:-307px -55px" class="sociable-hovers" /></a></li>
			<li><a rel="nofollow"  href="http://www.tumblr.com/share?v=3&amp;u=<?php echo $sociable_url;?>&amp;t=<?php echo $sociable_title;?>&amp;s=<?php echo $sociable_body; ?>" onclick="javascript:_gaq.push(['_trackEvent','outbound-product','www.tumblr.com']);" title="Tumblr"><img src="<?php echo $sociable_image_url;?>/sociable/images/services-sprite.gif" title="Tumblr" alt="Tumblr" style="width: 16px; height: 16px; background: transparent url(<?php echo $sociable_image_url;?>/sociable/images/services-sprite.png) no-repeat; background-position:-325px -55px" class="sociable-hovers" /></a></li>
			<li><a rel="nofollow"  href="http://twitter.com/home?status=<?php echo $sociable_title;?>%20-%20<?php echo $sociable_url;?>" onclick="javascript:_gaq.push(['_trackEvent','outbound-product','twitter.com']);" title="Twitter"><img src="<?php echo $sociable_image_url;?>/sociable/images/services-sprite.gif" title="Twitter" alt="Twitter" style="width: 16px; height: 16px; background: transparent url(<?php echo $sociable_image_url;?>/sociable/images/services-sprite.png) no-repeat; background-position:-343px -55px" class="sociable-hovers" /></a></li>

			<li><a rel="nofollow"  href="http://www.upnews.it/submit?url=<?php echo $sociable_url;?>&amp;title=<?php echo $sociable_title;?>" onclick="javascript:_gaq.push(['_trackEvent','outbound-product','www.upnews.it']);" title="Upnews"><img src="<?php echo $sociable_image_url;?>/sociable/images/services-sprite.gif" title="Upnews" alt="Upnews" style="width: 16px; height: 16px; background: transparent url(<?php echo $sociable_image_url;?>/sociable/images/services-sprite.png) no-repeat; background-position:-1px -73px" class="sociable-hovers" /></a></li>
			<li><a rel="nofollow"  href="http://www.wikio.fr/vote?url=<?php echo $sociable_url;?>" onclick="javascript:_gaq.push(['_trackEvent','outbound-product','www.wikio.fr']);" title="Wikio FR"><img src="<?php echo $sociable_image_url;?>/sociable/images/services-sprite.gif" title="Wikio FR" alt="Wikio FR" style="width: 16px; height: 16px; background: transparent url(<?php echo $sociable_image_url;?>/sociable/images/services-sprite.png) no-repeat; background-position:-55px -73px" class="sociable-hovers" /></a></li>
			<li><a rel="nofollow"  href="http://bookmarks.yahoo.com/toolbar/savebm?u=<?php echo $sociable_url;?>&amp;t=<?php echo $sociable_title;?>&opener=bm&amp;ei=UTF-8&amp;d=<?php echo $sociable_body; ?>" onclick="javascript:_gaq.push(['_trackEvent','outbound-product','bookmarks.yahoo.com']);" title="Yahoo! Bookmarks"><img src="<?php echo $sociable_image_url;?>/sociable/images/services-sprite.gif" title="Yahoo! Bookmarks" alt="Yahoo! Bookmarks" style="width: 16px; height: 16px; background: transparent url(<?php echo $sociable_image_url;?>/sociable/images/services-sprite.png) no-repeat; background-position:-145px -73px" class="sociable-hovers" /></a></li>
			<li><a rel="nofollow"  href="http://buzz.yahoo.com/submit/?submitUrl=<?php echo $sociable_url;?>&amp;submitHeadline=<?php echo $sociable_title;?>&amp;submitSummary=<?php echo $sociable_body; ?>&amp;submitCategory=science&amp;submitAssetType=text" onclick="javascript:_gaq.push(['_trackEvent','outbound-product','buzz.yahoo.com']);" title="Yahoo! Buzz"><img src="<?php echo $sociable_image_url;?>/sociable/images/services-sprite.gif" title="Yahoo! Buzz" alt="Yahoo! Buzz" style="width: 16px; height: 16px; background: transparent url(<?php echo $sociable_image_url;?>/sociable/images/services-sprite.png) no-repeat; background-position:-127px -73px" class="sociable-hovers" /></a></li>
			<li class="sociablelast"><a rel="nofollow"  href="http://yigg.de/neu?exturl=<?php echo $sociable_url;?>&amp;exttitle=<?php echo $sociable_title;?>" onclick="javascript:_gaq.push(['_trackEvent','outbound-product','yigg.de']);" title="Yigg"><img src="<?php echo $sociable_image_url;?>/sociable/images/services-sprite.gif" title="Yigg" alt="Yigg" style="width: 16px; height: 16px; background: transparent url(<?php echo $sociable_image_url;?>/sociable/images/services-sprite.png) no-repeat; background-position:-163px -73px" class="sociable-hovers" /></a></li>
		</ul>
		<div class="cb"></div>
	</div>
	*/
	?>
</div>
<script type="text/javascript">
	//<![CDATA[
		
		//script to put price box at the end
		 jQuery(window).load(function(){
			var biggestHeight = 0;
			var extraMargin = parseInt((jQuery('.product-image').css('margin-top')).replace("px", "")) - parseInt((jQuery('.product-cover').css('margin-top')).replace("px", ""));;
			if(jQuery('.product-image').height() > jQuery('.product-cover').height()){
				biggestHeight = jQuery('.product-image').height() - jQuery('.product-cover').height();
				jQuery('.product-cover .boxmeta').css('margin-top', '+=' + (extraMargin + biggestHeight) + 'px');
			}else if(jQuery('.product-image').height() == jQuery('.product-cover').height()){
				jQuery('.product-cover .boxmeta').css('margin-top', '+=' + extraMargin + 'px');
			}else if(jQuery('.product-image').height() < jQuery('.product-cover').height()){
				biggestHeight = jQuery('.product-cover').height() - jQuery('.product-image').height() ;
				jQuery('.product-image .social-box').css('margin-top', '+=' + (biggestHeight - extraMargin)+ 'px');
			}
		});
		
	//]]>
</script>
<?php /* 
<!-- comments list -->
<div class="comment_list">
<p class="heading"> Comments </p>
<?php
	if ($product_comments->num_rows() > 0)
	{
		foreach ($product_comments->result() as $row)
		{
			echo '<p class="comment_by"><span>', $row->comment_by_user_name, ' says :</span><span style="float:right">', date_format(new DateTime($row->comment_date), 'j M Y H:i' ), '</span></p> <p class="comment">', $row->comment, '</p>';
		}
	}
?>
</div>

<!-- add new comment -->
<script>
<!--
$(document).ready (function() {
	
	// intialize validator plug-in for form
	$("#comment_form").validate();

	$.extend($.validator.messages, {
	});
	
	// preventing from submiting normal request. always return false.
	$('form#comment_form').submit(function(){
		return false; 
	});
	
	// attached submit button on click event handler
	$('form#comment_form input#submit').click(function() {
	
		// client side form validation
		if($("#comment_form").valid() == false){
			return false;
		}
		
		// prepare post data in JSON format
		postData = $('form#comment_form').serializeObject();	
		
		// make an AJAX request to get data 
		$('div.inprocess').html('<img src="'+ conf['public_url'] +'/image/ajax-loader.gif">');
		
		$.ajax(
		{
			url: conf['base_url']+'/index.php/comment_controller/ajax_add_comment/',
			type: 'POST',
			data:{'request_data': JSON.stringify(postData)},
			dataType : 'json',
			success: function(data) 
			{
				ajax_add_success(data);
			},
			error: function(xhr, ajaxOptions, thrownError)
			{
				ajax_add_error(xhr, ajaxOptions, thrownError);
			}
		});
	});
	
	$('#add_comment_link').click(function() {		
		$('div.success').hide();
		$('div.form_body').show();
	});
	
});



// call on HTTP request success 
function ajax_add_success(data)
{
	$('div.inprocess').empty();
	$('div.form_body').hide();
	$('form#comment_form div.error').html('');
	$("form#comment_form #comment_by_user_name").attr('value','');
	$("form#comment_form #comment_by_user_email").attr('value','');
	$("form#comment_form #comment").attr('value','');
	$('div.success').show();
}

// call on HTTP request error
function ajax_add_error(xhr, ajaxOptions, thrownError)
{
	$('div.inprocess').empty();
	$('form#comment_form div.error').html('Ooops we can not sent your comments right now. Please try later.');
}

function void(){}
-->
</script>

<div>
	<div class="inprocess"></div>
	<div class="form_heading">Leave Comment</div>
	<div class="form_body">
		<form action="" method="post" id="comment_form">
			<input type="hidden" name="product_id" value="<?php echo $product->product_id; ?>" id="product_id" />
			<div class="field">
				<div class="label" for="author">Name (required)</div>
				<div class="control"><input type="text" name="comment_by_user_name" id="comment_by_user_name" value="" size="22" tabindex="1" class="required"/></div>
			</div>
			<div class="field">
				<div class="label" for="comment_by_user_email">Mail (required)</div>
				<div class="control"><input type="text" name="comment_by_user_email" id="comment_by_user_email" value="" size="22" tabindex="2" class="email required"/></div>
			</div>
			<div class="field">
				<div class="label" for="comment">Comment (required)</div>
				<div class="control"><textarea name="comment" id="comment" cols="40" rows="10" tabindex="4" class="required"></textarea></div>
			</div>
			<p align="right" style="padding-right:75px;"><input class="button" name="submit" type="submit" id="submit" tabindex="5" value="Submit Comment" /></p>

		</form>
		<!-- <p><small><strong>XHTML:</strong> You can use these tags: <code>&lt;a href=&quot;&quot; title=&quot;&quot;&gt; &lt;abbr title=&quot;&quot;&gt; &lt;acronym title=&quot;&quot;&gt; &lt;b&gt; &lt;blockquote cite=&quot;&quot;&gt; &lt;cite&gt; &lt;code&gt; &lt;del datetime=&quot;&quot;&gt; &lt;em&gt; &lt;i&gt; &lt;q cite=&quot;&quot;&gt; &lt;strike&gt; &lt;strong&gt; </code></small></p> -->

	</div>
	<div class="success" style="display:none;">
		Thank you. Your comment will be approved shortly. 
		<a id="add_comment_link" href="javascript:void(1);" rel="nofollow">Add another comment</a>
	</div>
</div>

*/ ?> 